<template>
    <div class="box">
        <div class="title">权限范围</div>
        <nav>
            <van-checkbox-group v-model="result">
                <ul>
                    <li>
                        <van-checkbox name="a">
                            自定义图标
                            <template #icon="props">
                                <img class="img-icon" :src="props.checked ? 'img/xuankuanga@2x.png' : 'img/weikuangkuang@2x.png'" />
                            </template>
                            </van-checkbox>
                    </li>
                </ul> 
            </van-checkbox-group>
        </nav>
         <!-- 底部按钮 -->
        <footer>
            <button>确定</button>
        </footer>
    </div>
</template>
<script>
export default {
    data() {
        return {
            result:['a']
        }
    },
}
</script>
<style lang="scss" scoped>
 .img-icon{
        width: 0.24rem;
        height: 0.24rem;
    }
    ul{
        padding: 0 0.2rem;
        box-sizing: border-box;
       font-size: 0.28rem;
       li{
           padding: 0.2rem 0;
           box-sizing: border-box;
           border-bottom: 0.01rem solid #eee;
       }
    }
.box{
    display: flex;
    flex-direction: column;
    height: 100%;
}
    .title{
        padding: 0.24rem;
        box-sizing: border-box;
        font-size: 0.3rem;
        font-family: PingFang SC;
        font-weight: bold;
        color: #343434;
        background:#F7F9FA;
        // line-height: 34px;
    }
    footer{
        padding: 0 0.24rem 0.24rem;
        box-sizing: border-box;
        background: white;
        button{
            width: 100%;
            height: 0.84rem;
            background: #2E9EFF;
            font-size: 0.33rem;
            font-family: PingFang SC;
            font-weight: bold;
            color: #FFFFFF;
            border: none;
            box-shadow: 0.01rem 0.12rem 0.12rem 0.02rem rgba(4, 111, 204, 0.07);
            border-radius: 0.08rem;
        }
    }
    nav{
        flex: 1;
        overflow: scroll;
        background: white;
    }
</style>